


        var workSwiper = new Swiper('.workSwiper',{
            loop:true,
        })

        $(document).ready(function(){

            var worksHref = window.location.href;
            for(var nn = 1;nn < $('.works nav.pc a').length;nn++){
                var thisHref = $('.works nav.pc a')[nn].getAttribute('href').split('.')[0];
                if(worksHref.indexOf(thisHref) >= 0){
                    $('.works nav.pc a:eq(' + nn +')').addClass('current');
                    $('.works nav.mobile a:eq(' + nn +')').addClass('current');
                    $('.works nav.mobile .present').text($('.works nav.mobile a:eq(' + nn +')').text());
                }
            }
            if(!$('.works nav.pc a.current').length){
                $('.works nav.pc a:eq(0)').addClass('current');
                $('.works nav.mobile a:eq(0)').addClass('current');
                $('.works nav.mobile .present').text($('.news nav.mobile a:eq(0)').text());
            }
            $('.works nav.mobile .contn .present').click(function(){
                if($(this).parent()[0].className.indexOf('clicked') >= 0){
                    $(this).parent().removeClass('clicked');
                    $('.works nav.mobile .contn .sonMenu').css('height','');
                }else{
                    $(this).parent().addClass('clicked');
                    var sonH = $('.works nav.mobile .contn .sonMenu .box')[0].offsetHeight;
                    $('.works nav.mobile .contn .sonMenu').height(sonH);
                }
            })
            $('.works nav.mobile .contn .sonMenu a').click(function(){
                $('.works nav.mobile .contn .present')[0].click();
            })

            $('.works .workList .contn .item .pic .btn').click(function(){
                if($(this)[0].className.indexOf('prev') >= 0){
                    workSwiper[$(this).parents('.item').index()].slidePrev();
                }else{
                    workSwiper[$(this).parents('.item').index()].slideNext();
                }
            })
            if(!$('.mobileDevice').length){
                for(var s = 0;s < workSwiper.length;s++){
                    workSwiper[s].params.allowTouchMove = false;
                }
            }
        })